//
//  Auction_SpecialSaleBusinessInfoGrade_View_WX.m
//  ZITHER
//
//  Created by weixin on 2019/6/4.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Auction_SpecialSaleBusinessInfoGrade_View_WX.h"

@implementation Auction_SpecialSaleBusinessInfoGrade_View_WX

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setCornerRadiusWithRadius:7 isMasks:YES];
        [self setUI];
    }
    return self;
}

-(void)setUI{
    [self.percentageLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.equalTo(self).offset(15);
        make.height.mas_equalTo(32);
    }];
    [self.likeCountLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.percentageLab.mas_bottom).offset(5);
        make.left.equalTo(self).offset(14);
        make.height.mas_equalTo(32);
    }];
    [self arrMBtn];
}

-(void)setData{

}

-(BaseLab *)percentageLab{
    if (!_percentageLab) {
        _percentageLab = [BaseLab initCustomLab:@"98%" color:HexColor(0x7A84ED) font:[UIFont fontWithName:@"Arial-BoldMT" size:30]];
        [self addSubview:_percentageLab];
    }
    return _percentageLab;
}

- (BaseLab *)likeCountLab{
    if (!_likeCountLab) {
        _likeCountLab = [BaseLab initCustomLab:@"300人推荐" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFang-SC-Regular" size:12]];
        [self addSubview:_likeCountLab];
    }
    return _likeCountLab;
}

- (NSMutableArray<Auction_SpecialSaleBusinessInfoGradeSub_View_WX *> *)arrMBtn{
    if (!_arrMBtn) {
        _arrMBtn = [[NSMutableArray alloc]init];
        for (int i = 0; i<3; i++) {
            Auction_SpecialSaleBusinessInfoGradeSub_View_WX *viewSub = [[Auction_SpecialSaleBusinessInfoGradeSub_View_WX alloc]init];
            viewSub.index = i;
            [viewSub setindex1:i];
            [self addSubview:viewSub];
            [_arrMBtn addObject:viewSub];
            [viewSub mas_makeConstraints:^(MASConstraintMaker *make) {
                make.top.equalTo(self.likeCountLab.mas_bottom).offset(20+40*i);
                make.left.right.equalTo(self).offset(0);
                make.height.mas_equalTo(40);
            }];
        }
    }
    return _arrMBtn;
}
@end
